Using Tag Filter filters
Tag Filter collects nodes that have a specific tag assigned.
For example, with tag filters you can:
Creating a Tag Filter
To create a tag filter:
- In the Library press Alt and right-click Rendering > Object Sources and select Tag Filter.
- In the Properties set:
- Source to the source from where you want to collect nodes for filtering.
For example, to apply your filter to all nodes in your project, select Root Object Source. You can select the output of another filter as the source from where you collect nodes for filtering. - Included Tags to tags of the nodes you want to include in the filter results. If you include more than one tag, the filter returns nodes that contain at least one of the listed tags. See Using tags.
- Excluded Tags to tags of the nodes you do not want to include in the filter results. If node contains only one of the tags listed in the Excluded Tags, the filter does not return that node. This is so even when the same node contains tags you added to the Included Tags.
Note that Kanzi filters lights in the same way it filters other nodes. When you create a filter that only includes a specific tag, the lights that light the tagged nodes are not included in the filter unless you add the tag to the light nodes. It is often more convenient to either:- Exclude the nodes you do not want to render.
- Tag all light nodes with a separate tag and include that tag in all your filters.
To take the tag filter into use:
-
In the Library > Rendering > Render Passes create a Group Render Pass and inside it create:
- Clear Render Pass
- Draw Objects Render Pass
- In the Library select the Draw Objects Render Pass you created and in the Properties set the Object Source property to the filter you created.
- In the Project select the Scene node to which you want to apply the filter and in the Properties set the Render Pass property to the Group Render Pass whose child Draw Objects Render Pass uses as its object source the filter you created.
Kanzi Studio renders the nodes collected by the filter.
Using a Tag Filter and tags to render only specific objects
To use a Tag Filter and tags to render only specific objects:
- Create a tag and assign it to the nodes you want to select for rendering. See Using tags.
- Create a Tag Filter and in the filter set the tags you want the filter to include and exclude. See Creating a Tag Filter.
-
In the Library > Rendering > Render Passes create a Group Render Pass and inside it create:
- Clear Render Pass
- Draw Objects Render Pass
- In the Library select the Draw Objects Render Pass you created and in the Properties set the Object Source property to the filter you created.
- In the Project select the Scene node to which you want to apply the filter and in the Properties set the Render Pass property to the Group Render Pass whose child Draw Objects Render Pass uses as its object source the filter you created.
Kanzi Studio renders the nodes collected by the filter.
Using Tag Filter filters in the API
For details, see the KzuTagFilter
class in the API reference.
See also
Using tags
Tutorial: Create reflections
Tutorial: Apply a stencil to 3D content
Using Contains Property Filter filters
Using Property Is Equal Filter filters
Using Object Type Filter filters
Using Sorting Filter filters
Filters
Open topic with navigation